using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for NGUOIDUNG.
     /// </summary>
     public class NGUOIDUNG
    {
              private string _MANGUOIDUNG;
      private Int32 _MANHANVIEN;
      private string _TENNGUOIDUNG;
      private string _TENDANGNHAP;
      private string _MATKHAU;
      private bool _ISDELETE;
      private NGUOIDUNG_QUYENHANList _listNGUOIDUNG_QUYENHAN;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMANGUOIDUNGNullable
      { get { return false;  } }
      public string MANGUOIDUNG
      {
         get { return _MANGUOIDUNG; }
         set { _MANGUOIDUNG = value; }
      }
      public bool IsMANHANVIENNullable
      { get { return true;  } }
      public Int32 MANHANVIEN
      {
         get { return _MANHANVIEN;  }
         set { _MANHANVIEN = value; }
      }
      public bool IsTENNGUOIDUNGNullable
      { get { return true;  } }
      public string TENNGUOIDUNG
      {
         get { return _TENNGUOIDUNG;  }
         set { _TENNGUOIDUNG = value; }
      }
      public bool IsTENDANGNHAPNullable
      { get { return true;  } }
      public string TENDANGNHAP
      {
         get { return _TENDANGNHAP;  }
         set { _TENDANGNHAP = value; }
      }
      public bool IsMATKHAUNullable
      { get { return true;  } }
      public string MATKHAU
      {
         get { return _MATKHAU;  }
         set { _MATKHAU = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }
public NGUOIDUNG_QUYENHANList NGUOIDUNG_QUYENHANList 
{ 
	get { return _listNGUOIDUNG_QUYENHAN; }
	set { _listNGUOIDUNG_QUYENHAN = value;}
}

        #endregion

        #region Constructors
        public NGUOIDUNG()
        {
            Reset();
        }
        public NGUOIDUNG(NGUOIDUNG obj)
        {
            	this._MANGUOIDUNG = obj.MANGUOIDUNG;
	this._MANHANVIEN = obj.MANHANVIEN;
	this._TENNGUOIDUNG = obj.TENNGUOIDUNG;
	this._TENDANGNHAP = obj.TENDANGNHAP;
	this._MATKHAU = obj.MATKHAU;
	this._ISDELETE = obj.ISDELETE;
        }
        #endregion

        public void Reset()
        {
                     _MANGUOIDUNG = EmptyValues.v_string;
         _MANHANVIEN = EmptyValues.v_Int32;
         _TENNGUOIDUNG = EmptyValues.v_string;
         _TENDANGNHAP = EmptyValues.v_string;
         _MATKHAU = EmptyValues.v_string;
         _ISDELETE = EmptyValues.v_bool;
	_listNGUOIDUNG_QUYENHAN = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MANGUOIDUNG"] is DBNull))
		{
			obj.MANGUOIDUNG = (string)reader["MANGUOIDUNG"];
		}
                if(!(reader["MANHANVIEN"] is DBNull))
		{
			obj.MANHANVIEN = (Int32)reader["MANHANVIEN"];
		}
                if(!(reader["TENNGUOIDUNG"] is DBNull))
		{
			obj.TENNGUOIDUNG = (string)reader["TENNGUOIDUNG"];
		}
                if(!(reader["TENDANGNHAP"] is DBNull))
		{
			obj.TENDANGNHAP = (string)reader["TENDANGNHAP"];
		}
                if(!(reader["MATKHAU"] is DBNull))
		{
			obj.MATKHAU = (string)reader["MATKHAU"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
//            _MANGUOIDUNG = (reader["MANGUOIDUNG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MANGUOIDUNG"];
//            _MANHANVIEN = (reader["MANHANVIEN"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MANHANVIEN"];
//            _TENNGUOIDUNG = (reader["TENNGUOIDUNG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENNGUOIDUNG"];
//            _TENDANGNHAP = (reader["TENDANGNHAP"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENDANGNHAP"];
//            _MATKHAU = (reader["MATKHAU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MATKHAU"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string MANGUOIDUNG, Int32 MANHANVIEN, string TENNGUOIDUNG, string TENDANGNHAP, string MATKHAU, bool ISDELETE)
        {
                     this._MANGUOIDUNG = MANGUOIDUNG;
         this._MANHANVIEN = MANHANVIEN;
         this._TENNGUOIDUNG = TENNGUOIDUNG;
         this._TENDANGNHAP = TENDANGNHAP;
         this._MATKHAU = MATKHAU;
         this._ISDELETE = ISDELETE;
        }
    }
}